From 8999f926972e6b6bbabb12424e5b21c545ceec48 Mon Sep 17 00:00:00 2001 From: "Karl O. Pinc" Date: Sat, 28 Dec 2019 15:37:22 -0600 Subject: [PATCH] Test to ensure that this pgwui component is autoconfigured --- setup.py | 8 +++----- tests/test___init__.py | 10 +++++++++- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/setup.py b/setup.py index 8209db4..08f14bc 100644 --- a/setup.py +++ b/setup.py @@ -165,9 +165,7 @@ setup( # To provide executable scripts, use entry points in preference to the # "scripts" keyword. Entry points provide cross-platform support and allow # pip to create the appropriate form of executable for the target platform. - # entry_points={ - # 'console_scripts': [ - # 'sample=sample:main', - # ], - # }, + # + # Setup an entry point to support PGWUI autoconfigure discovery. + entry_points={'pgwui.components': '.pgwui_logout = pgwui_logout'} ) diff --git a/tests/test___init__.py b/tests/test___init__.py index a7af24b..493f51b 100644 --- a/tests/test___init__.py +++ b/tests/test___init__.py @@ -1,4 +1,4 @@ -# Copyright (C) 2018 The Meme Factory, Inc. http://www.meme.com/ +# Copyright (C) 2018, 2019 The Meme Factory, Inc. http://www.meme.com/ # This file is part of PGWUI_Logout. # @@ -28,6 +28,14 @@ import pgwui_logout.__init__ as pgwui_logout_init pytest_plugins = ("pgwui",) +# Module packaging test + +def test_pgwui_upload_is_pgwui_component(pgwui_component_entry_point): + '''Ensure that pgwui_upload is a pgwui.component entry point + ''' + assert pgwui_component_entry_point('pgwui_logout') is True + + # Functional tests # includeme() -- 2.34.1